package com.nami.store.dubbo;

import com.nami.store.api.service.RemoteInvalidMsgService;

import com.nami.store.biz.inboxmsgs.application.InBoxMsgAppService;
import com.nami.store.biz.sendboxmsgs.application.SendBoxMsgAppService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.Date;

@Slf4j
@RequiredArgsConstructor
@DubboService
public class RemoteInvalidMsgServiceImpl implements RemoteInvalidMsgService {

    private final InBoxMsgAppService inBoxMsgAppService;

    private final SendBoxMsgAppService sendBoxMsgAppService;

    @Override
    public boolean delInBoxMsgByTime(String appKey, Date time) {
        return inBoxMsgAppService.delByTime(appKey, time);
    }

    @Override
    public boolean delSendBoxMsgByTime(String appKey, Date time) {
        return sendBoxMsgAppService.delByTime(appKey, time);
    }


}
